package com.gxa.jjty.core.pojo;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.context.annotation.Scope;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@Table(name = "handicapped")
@Scope("prototype")
public class Handicapped {
    @Id
    @ExcelIgnore
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "登记时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "登记时间", index = 0)
    @Column(name = "regtime")
    private Date regTime;
    @ExcelProperty(value = "姓名", index = 2)
    @ApiModelProperty(value = "残疾人名字")
    private String name;
    @ExcelIgnore
    @ApiModelProperty(value = "残疾人年龄")
    private Long age;
    @ExcelIgnore
    @ApiModelProperty(value = "残疾人性别")
    private String sex;
    @ExcelIgnore
    @ApiModelProperty(value = "爱好特长")
    private String hobby;
    @ExcelIgnore
    @ApiModelProperty(value = "健康状况")
    private String health;
    @ApiModelProperty(value = "手机号")
    @ExcelProperty(value = "手机号", index = 3)
    private String phone;
    @ExcelIgnore
    @ApiModelProperty(value = "地址")
    private String address;
    @ApiModelProperty(value = "服务状态")
    @ExcelProperty(value = "状态", index = 5)
    private String state;
    @ExcelIgnore
    @ApiModelProperty(value = "头像")
    private String img;
    @ExcelIgnore
    @ApiModelProperty(value = "登录令牌")
    private String token;
    @ExcelIgnore
    @ApiModelProperty(value = "免费服务次数")
    private Long freeServiceTimes;
    @ExcelIgnore
    @ApiModelProperty(value = "银行卡金额")
    private Double money;
    @ExcelProperty(value = "ID", index = 1)
    @ApiModelProperty(value = "残疾人的ID")
    private String code;
    @ExcelIgnore
    @ApiModelProperty(value = "残疾人的合同图片")
    private String contractImg;
    @ExcelIgnore
    @ApiModelProperty(value = "残疾人的合同开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "contractbegin")
    private Date contractBegin;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "残疾人的合同到期时间")
    @ExcelProperty(value = "合同到期时间", index = 4)
    @Column(name = "contractend")
    private Date contractEnd;
    //残疾人亲属关系接收
    @ExcelIgnore
    private List<Kinship> kinship;

}
